

#ifndef PF_INFOAREA_H
#define PF_INFOAREA_H

#include <QVector>
#include "pf_vector.h"
#include "lx_Export.h"


/**
 * Class for getting information about an area. 
 *

 */
class LX_EXPORT PF_InfoArea {
public: 
	PF_InfoArea();
	~PF_InfoArea();

	void reset();
	void addPoint(const PF_Vector& p);
	void calculate();
	void close();
	bool isValid();
	bool isClosed();
	double getArea() { 
		return area; 
	}
	double getCircumference() { 
		return circumference; 
	}
	int count() { 
		return thePoints.count(); 
	}

private:
	double calcSubArea(const PF_Vector& p1, const PF_Vector& p2);

        QVector<PF_Vector> thePoints;
	double baseY;
	double area;
	double circumference;
};

#endif
